package com.hsp.demo_10.codeblock;

public class Demo_04 {
    public static void main(String[] args) {
        AA04 aa04 = new AA04();

    }
}

class AA04{
    public String str = getStr();
    public static int count = getCount();

    static{
        System.out.println("静态代码块");
    }

    {
        System.out.println("非静态代码块初始化");
    }

    public AA04(){
        System.out.println("构造器执行");
    }

    private static int getCount(){
        System.out.println("静态属性初始化");
        return 1;
    }

    private String getStr(){
        System.out.println("成员变量初始化");
        return null;
    }
}

